import 'package:flutter/material.dart';
import 'package:leader_help/utils/component/component.dart';
import 'package:leader_help/utils/util.dart';
import 'package:get/get.dart';
import '../controller.dart';

class HomeClassicView extends GetView<HomeController> {
  const HomeClassicView({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GetBuilder<HomeController>(
      builder: (controller) => Container(
        margin: EdgeInsets.symmetric(horizontal: 10.r),
        height: 100.r,
        decoration: BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.circular(10.r),
        ),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceAround,
          children: controller.state.headerMenu
              .map((e) => MenuItemView(
                    icon: Icon(
                      e.iconData,
                      size: 30.r,
                      color: ColorsUtil.red,
                    ),
                    title: Text(
                      e.name,
                      style: pfMediumStyle(
                          color: ColorsUtil.title, fontSize: 13.sp),
                    ),
                    onTap: e.onTap,
                  ))
              .toList(),
        ),
      ),
    );
  }
}
